arm: Add a hypercall for device mmio mapping
authorShannon Zhao <shannon.zhao@linaro.org>
Wed, 30 Mar 2016 10:09:00 +0000 (12:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 30 Mar 2016 15:05:49 +0000 (17:05 +0200)
commit102984bb1987df3b07d83c8009a10f9ff33b7eb5
treece916b0dd5912775824bc1668382210e45ade73c
parent076e922161059cee6eac52f4a614e0ea6029a42e
arm: Add a hypercall for device mmio mapping

It needs to map platform or amba device mmio to Dom0 on ARM. But when
booting with ACPI, it can't get the mmio region in Xen due to lack of
AML interpreter to parse DSDT table. Therefore, let Dom0 call a
hypercall to map mmio region when it adds the devices.

Here we add a new map space like the XEN_DOMCTL_memory_mapping to map
mmio region for Dom0. Also add a helper to combine the
xsm_add_to_physmap and XENMAPSPACE_dev_mmio space check together.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/mm.c
xen/arch/arm/p2m.c
xen/common/memory.c
xen/include/asm-arm/p2m.h
xen/include/public/memory.h